<template>
	<view class="state Han">
		<view class="state_head devideLine">
			<view class="cancel md4Text" @click="deleteState">取消</view>

			<view class="title smTitle">简历状态</view>

			<view class="confirm md4Text mblue" @click="chooseState">确定</view>
		</view>

		<view class="stateList">
			<view class="stateItem" v-for="(state, stateIndex) in stateList" :key="stateList"
				@click="getState(stateIndex)">
				<view class="stateContent">
					<view class="txtInfo " :class="{stateActive:ins==stateIndex}">
						<text class="smTitle">
							{{ state.mode }}
						</text><br />
						<text class="md4Text">{{ state.text }}</text>


					</view>
				</view>
				<image src="../../../static/imgs/mine/checked.png" mode="" class="checkedIcon" v-show="ins == stateIndex"></image>
			</view>






		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				stateList: [{
					mode: '推送模式',
					text: '您的求职将会被企业看到，并主动向您打招呼'
				}, {
					mode: '免扰模式',
					text: '企业无法与您打招呼，需要您主动联系企业'
				}],
				ins: 0
			};
		},

		methods: {
			getState(index) {
				this.ins = index;
			},
			deleteState() {
				this.ins = -1;
				this.$emit('hasChoosed');
			},
			chooseState() {
				this.$emit('hasChoosed');
			}
		}
	};
</script>

<style scoped lang="less">
	.checkedIcon {
		width: 34upx;
		height: 34upx;
		margin-left: 20upx;
	}

	.state {
		width: 100vw;
		height: 570upx;
		position: fixed;
		z-index: 1001;
		bottom: 0;
		background-color: #ffffff;
		padding: 0 36upx;

		.state_head {
			width: 100%;
			height: 120upx;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.stateList {
			width: 100%;
			height: calc(100% - 120upx);
			overflow-y: auto;
			padding-top: 43upx;

			.stateItem {
				width: 100%;
				display: flex;
				font-weight: bold;
				margin-bottom: 50upx;
				align-items: center;
              .stateContent{
				  width:calc(100% - 54upx);
			  }
				image {
					width: 34upx;
					height: 34upx;
					vertical-align: middle;
					
				}

				.txtInfo {
					width: 100%;
					// height: 80upx;
					background: #FFFFFF;

					border: 1px solid rgba(52, 101, 177, 0.4117647058823529);
					opacity: 1;
					text-align: center;
					line-height: 45upx;
					border-radius: 44upx;
					margin-top: 24upx;
					margin-left: auto;
				}
			}

			.stateActive {
				background: #F8FCFF;
				color: #3465B1;
			}
		}
	}
</style>
